package com.wnxy.util;

import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class DateUtil {
    public static String parseDateLong(Long time,String format){
        SimpleDateFormat sd = new SimpleDateFormat(format);
        return sd.format(new Date(time));
    }
    public static Long parseDateString(String time,String format) throws ParseException {
        SimpleDateFormat sd=new SimpleDateFormat(format);
        return sd.parse(time).getTime();
    }

    public static void main(String[] args) {
        System.out.println(System.currentTimeMillis());
    }
}
